<?php
namespace app\admin\Validate;
use think\Validate;

class Book extends Validate{
    protected $rule=[
        'book_name'=>'require',
        'book_degist'=>'require|max:25',
        'book_content'=>'require',
        'book_thumb'=>'require',
        'book_price'=>'require'
    ];
    protected $message=[
        'book_name.require'=>"请填写图书名称",
        'book_degist.require'=>'请填写图书摘要',
        'book_degist.max'=>'图书摘要不能超过25个字符',
        'book_content.require'=>'请填写图书内容',
        'book_thumb'=>'请上传图书缩略图',
        'book_price.require'=>'请填写图书价格'
    ];
}